#!/usr/bin/env node


//实现打开外部程序


const cp=require('child_process');
const cmd=process.argv[2];
const args=process.argv.slice(3,process.length);

console.log(cmd);
console.log(args);


cp.execFile(cmd,args,(err,stdout)=>{
  console.log(stdout.toString('utf-8'));
  

});
//./01-exec-file.js cmd args
